package com.tledu.week.service;

import com.github.pagehelper.PageHelper;
import com.tledu.week.mapper.UserMapper;
import com.tledu.week.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Antg
 * @date 2021/8/10  16:30
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findWithPage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<User> list = userMapper.findAll();
        return list;
    }
}
